package org.ns.longhttp.selector.datamapper.responseid;

import org.ns.longhttp.wrapper.MapWrapper;

public class DefaultDataResponseIdFactory implements DataResponseIdFactory{

    private final static DefaultDataResponseIdFactory defaultDataResponseIdFactory = new DefaultDataResponseIdFactory();

    private MapWrapper<String, DataResponseIdService> serviceMap = new MapWrapper<>();
    
    private DefaultDataResponseIdFactory(){

    }
    public static DefaultDataResponseIdFactory get() {
        return defaultDataResponseIdFactory;
    }

    @Override
    public DataResponseIdService getIdService(String key) {

        return serviceMap.get(key, DefaultDataResponseIdService::new);
    }
}
